package top.huhuiyu.springboot2.study.entity.joke;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author 胡辉煜
 */
@Data
//下面的注解表示如果json中的字段和实体不匹配就无视，而不会触发异常
@JsonIgnoreProperties(ignoreUnknown = true)
public class Joke implements Serializable {
  private static final long serialVersionUID = 1L;
  private Integer code;
  private String msg;
  private List<JokeData> data;

  @Data
  @JsonIgnoreProperties(ignoreUnknown = true)
  public static class JokeData implements Serializable {
    private static final long serialVersionUID = 1L;
    private String content;
    private String updateTime;
  }

}
